package com.exercise.widgets.chip.wrapper

import com.exercise.widgets.R

class DynamicChipGroupAdapter(
    dataList: MutableList<DetectType>
) : BaseDynamicChipAdapter<DetectType>(
    data = dataList,
    layoutResId = R.layout.activity_child_chip
) {
    val checkedItem: DetectType?
        get() = checkedIndex?.let {
            data[it]
        }
    val checkedItems: List<DetectType>
        get() = checkedIndexList.map {
            data[it]
        }

    override fun bindItem(item: DetectType): String {
        return item.name
    }
}

class DetectType(
    val name: String,
    val code: String
)